1. Field of the Invention
This invention relates to a focus detecting device for detecting the focusing state of a photo taking optical system through a video signal produced from an image sensor.
2. Description of the Related Art
Heretofore, for a camera of the kind having an image sensor, such as a video camera or the like, there has been known a method in which the sharpness of an image of a photographing object formed on an image sensing plane is detected through a video signal obtained from the image sensor and a photo taking optical system is driven to shift its position in such a way as to maximize the sharpness of the object image. This method includes, for example, a well known method called "hill climbing servo method" which is described in detail in "NHK GIJUTSU KENKYU," 1965, Vol. 17, No. 1, (Whole No. 86), p 21 to p 37. In accordance with the hill climbing servo method, a high frequency component of a video signal is extracted by means of a high-pass filter or the like and then the position of an optical system is shifted to a position at which the amplitude of the high frequency component reaches a maximum value. In order to find this position, however, the amplitude obtained at the present optical system position must be compared with a previous amplitude value obtained a little while ago at its previous position or with an amplitude value obtained at an optical system position which somewhat deviates from the present position. Therefore, a shortcoming of the method resides in that an in-focus position is not detectable until the optical system comes to pass the in-focus position. It is another shortcoming of the method that the amplitude of the high frequency component is dependent in part on illuminating conditions and, therefore, it tends to reach the maximum value due to variations in the illuminating conditions, movements of the object, etc. even when the optical system is still out of focus. This shortcoming has often resulted in erroneous actions.
A focus detecting method which is free from the above stated shortcoming has been proposed in U.S. Pat. Application Ser. No. 922,740, now U.S. Pat. No. 4,804,831, filed Oct. 24, 1986, assigned to the same assignee as the assignee of the present invention. In the case of this method, attention is directed to the width of the edge of an object to be photographed. The width is detected by computing a ratio between the gradient of lightness variations of the edge portion and a difference in lightness. Then, the focused state of the object image formed on an image sensing plane is determined according to the value of the ratio thus computed. This method is employed also in an invention disclosed in U.S. Pat. Application Ser. No. 046,252, now abandoned which was filed May 5, 1987 and also assigned to the same assignee as that of the present invention. A brief description of this method is as follows:
Referring to FIG. 1(a), an edge portion 50 of an object is assumed to be within a focus detecting area 52. A spatial coordinate axis x perpendicularly crosses the optical axis of an optical system and extends in the horizontal scanning direction of an image sensor. A video signal I(x) (more specifically, a luminance signal) which is obtained from the image sensor steeply changes in the case of an in-focus state as shown in FIG. 1(b) and mildly changes in the event of an out-of-focus state as shown in FIG. 1(c). The width .DELTA.x of the changing part of the video signal I(x) corresponding to the edge portion of the object becomes a minimum value .DELTA.xo in the case of the in-focus state and increases according as the position of the optical system deviates from the in-focus state. The width .DELTA.x is determined by the diameter of circle of confusion of the optical system, the resolving power of the image sensor and the frequency bandwidth of a video signal processing circuit. However, since the latter two are irrelative to the focusing state of the optical system, the in-focus state, the out-of-focus state and the degree of the out-of-focus (hereinafter referred to as defocus) state. In other words, the optical system can be discriminated as in an in-focus state in the case of .DELTA.x.apprxeq..DELTA.xo. This discrimination is made independently of the average lightness of the edge portion and the contrast of the object to be photographed.
More specifically, the differential value dI(x)/dx of the video signal I(x) and the variation value .DELTA.I of the lightness are computed and P (=I/.DELTA.x) which is obtained from a formula P=(dI(x)/dx)/.DELTA.I is considered to be an in-focus signal. Since the variable x represents also the horizontal scanning direction, the value of dI(x)/dx is obtainable by temporally differentiating the video signal.
However, in cases where a high degree of focusing precision is required, the method is likely to result in an erroneous action due to an inconsistency of the evaluation value P which arises depending on a movement of the object or the image position of the object on the image plane, i.e. the position of the image relative to the picture elements which constitute the image sensor. In view of this, a method of averaging the focus evaluation values either for all horizontal scanning lines or for scores of scanning lines obtained within a focus detecting area of the image plane has been proposed as a solution of the problem. The method of merely averaging the value P, however, would result in an erroneous evaluation value in the event of an object which is short in the vertical direction as shown in FIG. 2.